//接口
import request from "@/utils/request.js";

// 获取签名地址 /lifepolicy/apihandle/getSignUrl
export function getSignUrl() {
    return request({
        url: "/lifepolicy/apihandle/getSignUrl",
        method: "post",
    });
}

// 获取openid /lifepolicy/apihandle/getOpenid
export function getOpenid(sign) {
    return request({
        url: "/lifepolicy/apihandle/getOpenid",
        method: "post",
        params: {},
        data: {sign},
    });
}

// 人脸获取跳转链接 /lifepolicy/apihandle/findSchemeUrl
export function findSchemeUrl(data) {
    // console.log('data',data)
    return request({
        url: "/lifepolicy/apihandle/findSchemeUrl",
        method: "post",
        params: {},
        data: data,
    });
}

// 获取人脸获取识别结果 /lifepolicy/apihandle/findFaceResult
export function findFaceResult(data) {
    // console.log('data',data)
    return request({
        url: "/lifepolicy/apihandle/findFaceResult",
        method: "post",
        params: {},
        data: data,
    });
}

// 手签请求 /lifepolicy/apihandle/handSign
export function handSign(data) {
    // console.log('data',data)
    return request({
        url: "/lifepolicy/apihandle/handSign",
        method: "post",
        params: {},
        data: data,
    });
}

// 检查用户是否在白名单内 /lifepolicy/apihandle/checkUser
export function checkUser(data) {
    return request({
        url: "/lifepolicy/apihandle/checkUser",
        method: "post",
        data,
        withCredentials: true, // 添加此行以允许携带凭证
    });
}

// 判断活动有效期 /lifepolicy/apihandle/validityEnter
export function validityEnter() {
    return request({
        url: "/lifepolicy/apihandle/validityEnter",
        method: "post",
    });
}
